<style>
#load{
    width:100%;
    height:100%;
    position:fixed;
    z-index:9999;
    background:url("images/loading_bar.gif") no-repeat center center #fff;
}
</style>
<script>
document.onreadystatechange = function () {
	var path = window.location.href;
    path = path.replace(/\/$/, "");
    path = decodeURIComponent(path);
	var pageUrl		=	path;
	sessionStorage.setItem( 'pageUrl', JSON.stringify(pageUrl) );
  
  var state = document.readyState
  if (state == 'interactive') {
       document.getElementById('contents').style.visibility="hidden";
  } else if (state == 'complete') {
      setTimeout(function(){
	   if(typeof sessionStorage["user_id"]!='undefined'){
			document.getElementById('interactive');
			document.getElementById('load').style.visibility="hidden";
			document.getElementById('contents').style.visibility="visible";
		 }else{
			window.location="index.html";
		 }
      },300);
  }
}
</script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script src="js/webserviceurl.js"></script>
<script src="js/validations.js"></script>
<script src="js/commonfunctions.js"></script>
<script src="js/text.js"></script>
<link href="css/style.css" rel="stylesheet">
<link href="css/default.css" rel="stylesheet">
<link href="css/responsive.css" rel="stylesheet">
<script>
$(function() {
$('#sidemenu').load('side-menu.html');
$('#header').load('header.html');
$('#footer').load('footer.html');
});
</script>
<div id="load"></div>
<div id="contents">
  <div id="header"></div>
    <div class="container-fluid">
      <div class="row-fluid container_bg">
      <div id="sidemenu"></div>
        <div class="span9 pos_r">
			<div class="container_title">
				<div class="pos_r"><h1>User Complaints</h1> <a href="complaints.html" style="position:absolute;top:5px;right:10px;">View Complaints</a></div>
				<div  id="success_alert" class="alert_sucess alert alert-success span11" style="display:none;">
					<i class="icon-ok"></i>&nbsp;&nbsp;
					<span  id="CheckComplaint"></span>
				</div>
				<div  id="error_alert" class="alert_sucess alert alert-error span11" style="display:none;">
					<i class="icon-remove"></i>&nbsp;&nbsp;
					<span  id="CheckComplaintError"></span>
				</div>
				<div class="container_form_top">
				<form class="form-horizontal" id="userComplaints" name="userComplaints">
					<div class="control-group">
						<label class="control-label" for="trackId">Enter Tracking Id</label>
						<div class="controls">
						<input type="text" class="span8" id="complaintId" name="complaintId" placeholder="Please Enter Tracking Id"><span id="errorComplaintTrackId" name="errorComplaintTrackId" style="color:red"></span>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="complaint">Complaint</label>
						<div class="controls">
						<textarea rows="3" class="span8" id="textArea" name="textArea" placeholder="Please Enter Complaint"></textarea><span style="color:red" id="complaintError" name="complaintError"></span>
						</div>
					</div>
					<div class="control-group">
						<div class="controls">
						<button type="button" class="medicart_btn" onclick="validUserComplaint()">Submit</button><span id="userComplaintReload"></span>
						</div>
					</div>
				</form>
				</div>
			</div>
        </div>
      </div>
    </div>
     
<div id="footer"></div>
</div>
<script>
$('#textArea').keypress(function(e){
	if( e.keyCode == 13 ){
		validUserComplaint();	
	}
});
</script>

